﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PayablesReport.Export.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
     <style type="text/css">
        .thheader{
        font-weight:bold;vertical-align:middle;text-align:center;
        font-size:11px;
        border:1px solid #ccc !important;
        line-height: 7px !important;;
        }
        .totalamount{
        font-weight:bold;
        }
    </style>
    <style type="text/css">
        html {
                font-size: 100%;
                height: 100%;
                margin-bottom: 1px; /* Always show a scrollbar to avoid jumping when the scrollbar appears  */
                }

        body {
                font-family: Arial, Helvetica, sans-serif;
                color: #555;
                background: #fff;
                font-size: 12px;
                }
        a        { color: #57a000; text-decoration: none; }
        a:hover     { color: #000; }
        a:active     { color: #777; }
        a:focus     { outline: 1px; }
        table{border-collapse:collaspe;border:1px solid #fff;border-bottom:1px solid #fff;border-right:1px solid #fff;border-left:1px solid #fff;}
        td {border-collapse: collapse;border:1px solid #fff;border-bottom:1px solid #fff;border-right:1px solid #fff;border-left:1px solid #fff;}
        .normal {border-collapse: collapse;border:1px solid #fff;}
        table.adminlistprint {
            background-color: #fff;
            border-collapse: collapse;
            border-left: 1px solid #CCCCCC;
            border-top: 1px solid #CCCCCC;
            border-right: 1px solid #CCCCCC;
            border-bottom: 1px solid #CCCCCC;
            color: #666666;
            font-size: 12px;
            width: 100%;
        }
        table.adminlistprint td, table.adminlistprint th {
            padding: 3px !important;
            background-color: #fff;
        }
        table.adminlistprint td, table.adminlistprint th  {
            border-bottom: 1px solid #CCCCCC;
            border-right: 1px solid #CCCCCC;
            border-left: 1px solid #CCCCCC;
        }
        table.adminlistprint thead, table.adminlistprint th {
            padding: 3px !important;
            background-color: #ECECEC;
        }
        @media screen, projection{
	    span.pseudolink
	    {
		    color:Blue;
		    text-decoration:underline;
		    font-size:10pt;
		    font-family:Tahoma;
		    cursor:hand
	    }
        header, footer
        {
	        display:none
        }

        @media print{
	        span.pseudolink
	        {
		        display:none
	        }
	        header, footer
	        {
		        display:none
	        }
        }
        .hideifnoscript {
	        display: none
        }
        .wrapword{
        white-space: -moz-pre-wrap !important;  /* Mozilla, since 1999 */
        white-space: -pre-wrap;      /* Opera 4-6 */
        white-space: -o-pre-wrap;    /* Opera 7 */
        white-space: pre-wrap;       /* css-3 */
        word-wrap: break-word;       /* Internet Explorer 5.5+ */
        word-break: break-all;
        white-space: normal;


        }
         .bottom td
        {
         font-weight:bold;
         text-align:left;
        }
        .red
        {
            color:Red !important;
        }     
    </style>
</head>
<body>
    <div id="body-wrapper">
        <div id="header">          
        </div>
        <div id="main-content1">
            <h2>
                BÁO CÁO PHẢI TRẢ NHÀ CUNG CẤP: <% =Province%>
            </h2>
            <div class="clear">
            </div>
            <div class="content-box">
                <form id="frmEdit" runat="server">                   
                    <asp:Repeater ID="rptData" runat="server">
                        <ItemTemplate>
                            <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'"
                                payablesreport='<%#Eval("ID") %>'>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "Index")%>
                                </td>
                                <td editable="false" code="Agent">
                                    <%# DataBinder.Eval(Container.DataItem, "Agent")%>
                                </td>
                                <td editable="false" code="FileNumber">
                                    <%# DataBinder.Eval(Container.DataItem, "FileNumber")%>
                                </td>
                                <td editable="false" code="ETD">
                                    <%# DataBinder.Eval(Container.DataItem, "ETD")%>
                                </td>
                                <td editable="false" code="TotalBuyInvoice">
                                    <%# DataBinder.Eval(Container.DataItem, "TotalBuyInvoice")%>
                                </td>
                                <td editable="true" code="Payables_Payment" style="width: 100px;">
                                    <%# DataBinder.Eval(Container.DataItem, "Payables_Payment")%>
                                </td>
                                <td editable="false" code="Payables_Must_Payment">
                                    <%# DataBinder.Eval(Container.DataItem, "Payables_Must_Payment")%>
                                </td>
                                <td editable="false" code="TotalComAgent">
                                    <%# DataBinder.Eval(Container.DataItem, "TotalComAgent")%>
                                </td>
                                <td editable="false" code="TotalTaxAgent">
                                    <%# DataBinder.Eval(Container.DataItem, "TotalTaxAgent")%>
                                </td>
                                <td editable="false" code="ComAfterTax">
                                    <%# DataBinder.Eval(Container.DataItem, "ComAfterTax")%>
                                </td>
                                <td editable="true" code="Payables_Paid_Com" style="width: 100px;">
                                    <%# DataBinder.Eval(Container.DataItem, "Payables_Paid_Com")%>
                                </td>
                                <td editable="false" code="Payables_Must_Paid_Com" class='<%#double.Parse(Eval("Payables_Must_Paid_Com").ToString())<0?" red":" " %>'>
                                    <%#double.Parse(Eval("Payables_Must_Paid_Com").ToString())!=0?double.Parse(Eval("Payables_Must_Paid_Com").ToString()).ToString("#,#"):""%>
                                </td>
                                <td editable="true" code="Payables_Update">
                                    <%# DataBinder.Eval(Container.DataItem, "Payables_Update")%>
                                </td>
                                <td editable="true" code="Payables_PaymentMethod">
                                    <%# DataBinder.Eval(Container.DataItem, "Payables_PaymentMethod")%>
                                </td>
                                <td editable="false" code="Customer" style="width: 150px;">
                                    <%# DataBinder.Eval(Container.DataItem, "Customer")%>
                                </td>
                                <td editable="true" code="Payables_Note" style="width: 100px;">
                                    <%# DataBinder.Eval(Container.DataItem, "Payables_Note")%>
                                </td>                               
                            </tr>
                        </ItemTemplate>
                        <HeaderTemplate>
                            <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlistprint"
                                editcellcontent="true">
                                <thead>
                                    <tr style="background: #ECECEC;">
                                        <th align="center" rowspan="2" >
                                            STT
                                        </th>
                                        <th align="center" colspan="3" >
                                            Chi tiết
                                        </th>
                                        <th align="center" colspan="3" >
                                            Số phải trả nhà cung cấp
                                        </th>
                                        <th align="center" colspan="5" >
                                            Thanh toán COM & Thu lại thuế của Nhà cung cấp
                                        </th>
                                        <th align="center" rowspan="2" >
                                            Ngày TT
                                        </th>
                                        <th align="center" rowspan="2" >
                                            HTTT
                                        </th>
                                        <th align="center" rowspan="2" >
                                            Khách hàng
                                        </th>
                                        <th align="center" rowspan="2" >
                                            Ghi chú
                                        </th>                                       
                                    </tr>
                                    <tr style="background: #ECECEC;">
                                        <th align="center" >
                                            Nhà cung cấp
                                        </th>
                                        <th align="center" >
                                            Số File
                                        </th>
                                        <th align="center" >
                                            ETD
                                        </th>
                                        <th align="center" >
                                            Số tiền phải trả
                                        </th>
                                        <th align="center" >
                                            Số tiền đã trả
                                        </th>
                                        <th align="center" >
                                            Số tiền còn phải trả
                                        </th>
                                        <th align="center" >
                                            COM nhà cung cấp
                                        </th>
                                        <th align="center" >
                                            Thuế thu lại
                                        </th>
                                        <th align="center" >
                                            COM sau thuế
                                        </th>
                                        <th align="center" >
                                            COM đã TT
                                        </th>
                                        <th align="center" >
                                            COM còn phải trả
                                        </th>
                                    </tr>
                                </thead>
                        </HeaderTemplate>
                        <FooterTemplate>
                            <tr class="bottom">
                                <td colspan="2">
                                </td>
                                <td colspan="2">
                                    Tổng cộng</td>
                                <td>
                                    <% =SUM_Ref_Payables_Must_Payment %>
                                </td>
                                <td>
                                    <% =SUM_Payables_Payment%>
                                </td>
                                <td>
                                    <%=SUM_Payables_Must_Payment %>
                                </td>
                                <td>
                                    <%=SUM_Ref_Payables_Must_Paid_Com %>
                                </td>
                                <td>
                                    <%=SUM_Payables_Tax_Agent %>
                                </td>
                                <td>
                                    <%=SUM_ComAfterTax %>
                                </td>
                                <td>
                                    <%=SUM_Payables_Paid_Com %>
                                </td>
                                <td>
                                    <%=SUM_Payables_Must_Paid_Com %>
                                </td>
                                <td colspan="8">
                                </td>
                            </tr>
                            </TABLE>
                        </FooterTemplate>
                    </asp:Repeater>
                    <div class="clear">
                    </div>
                    <div id="footer">
                        <%=strPager%>
                    </div>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
